package com.current.game.common;

import java.awt.*;

/**
 * @author baopan
 * @createTime 2024/5/12 22:07
 */
public class TileColors {
    public static final Color TILE_0 = new Color(255, 255, 255); // 白色
    public static final Color TILE_2 = new Color(255,235,205); // 浅棕色
    public static final Color TILE_4 = new Color(160, 150, 130); // 稍深的棕色

    // 假设的颜色，具体可能因游戏而异
    public static final Color TILE_8 = new Color(0,0,255);
    public static final Color TILE_16 = new Color(85,107,47);
    public static final Color TILE_32 = new Color(189,183,107);
    public static final Color TILE_64 = new Color(80, 70, 50);

    public static final Color TILE_128 = new Color(60, 50, 40); // 深棕色或其他深色
    public static final Color TILE_256 = new Color(0, 100, 200); // 蓝色或其他鲜艳色
    public static final Color TILE_512 = new Color(0, 200, 100); // 绿色或其他鲜艳色
    public static final Color TILE_1024 = new Color(200, 0, 0); // 红色或其他鲜艳色

    // 2048 通常是最高分，可以使用更亮的红色或其他更显眼的颜色
    public static final Color TILE_2048 = new Color(255, 0, 0); // 亮红色

    // ... 其他可能的颜色（如果需要）

    public static Color getColorByValue(int value){
        switch (value){
            case 0:
                return TILE_0;
            case 2:
                return TILE_2;
            case 4:
                return TILE_4;
            case 8:
                return TILE_8;
            case 16:
                return TILE_16;
            case 32:
                return TILE_32;
            case 64:
                return TILE_64;
            case 128:
                return TILE_128;
            case 256:
                return TILE_256;
            case 512:
                return TILE_512;
            case 1024:
                return TILE_1024;
            case 2048:
                return TILE_2048;
            default:
                return null;
        }
    }
}
